//
//  LSZFileUploadGenericManager.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/8/21.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZFileUploadGenericManager.h"

@implementation LSZFileUploadGenericManager
-(id)initWithFileUploadGeneric :(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSString class]]) {
            return self;
        }
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSNumber class]]) {
            return self;
        }
        if (![dic valueForKey:@"data"]) {
            return self;
        }
        NSArray * arrayData = dic[@"data"];
        self.arrayData = [[NSMutableArray alloc]init];
        self.idString = [[NSString alloc]init];
        NSMutableArray * AddArrayMg = [[NSMutableArray alloc]init];
        for (int i = 0; i<arrayData.count; i++) {
            NSDictionary * diction = arrayData[i];
            LSZFileUploadGenericMg * mg = [[LSZFileUploadGenericMg alloc]init];
            mg.id_id = NullStringjudgment(NSStr(diction[@"id"]));
            mg.url = NullStringjudgment(NSStr(diction[@"url"]));
            [AddArrayMg addObject:mg];
            if(i == 0){
                self.idString = mg.id_id;
            }else{
                self.idString = [NSString stringWithFormat:@"%@,%@",self.idString,mg.id_id];
            }
        }
        self.arrayData = AddArrayMg;
    }
    return self;
}
@end

@implementation LSZFileUploadGenericMg
@end
